import request from '@/utils/request'
import { projectApiUrl } from '../config'

/**
 * 施工日志列表分页
 * @param parameter
 */
export function getLogList(parameter) {
  return request({
    url: projectApiUrl + '/construction/log/list',
    method: 'post',
    data: parameter
  })
}


/**
 * 施工日志详情
 * @param parameter
 */
export function getLogDetails(parameter) {
  return request({
    url: projectApiUrl + '/construction/log/details',
    method: 'get',
    params: parameter
  })
}

/**
 * 施工日志详情(核查时)
 */
export function getLogDetailByCheck(params) {
  return request({
    url: projectApiUrl + '/construction/log/check-details',
    method: 'get',
    params
  })
}

/**
 * 施工日志编辑详情  可回显部分数据
 * @param parameter
 */
export function getLogEditDetails(parameter) {
  return request({
    url: projectApiUrl + '/construction/log/edit-details',
    method: 'get',
    params: parameter
  })
}




/**
 * 施工日志填写
 * @param parameter
 */
export function getLogAdd(parameter) {
  return request({
    url: projectApiUrl + '/construction/log',
    method: 'post',
    data: parameter
  })
}

/**
 * 施工日志核查
 * @param parameter
 */
export function getLogCheck(parameter) {
  return request({
    url: projectApiUrl + '/construction/log/check',
    method: 'post',
    data: parameter
  })
}


/**
 * 施工日志统计
 * @param
 */
export function getLogTotal(params) {
  return request({
    url: projectApiUrl + '/construction/log/count/list',
    method: 'POST',
    data: params
  })
}


/**
 * 施工日志打印
 * @param
 */
export function getLogDoc(params) {
  return request({
    url: projectApiUrl + '/construction/log/doc',
    method: 'get',
    params
  })
}

/**
 * 填写人信息查询
 * @param
 */
export function getLogFiller(data) {
  return request({
    url: projectApiUrl + '/construction/log/filler',
    method: 'post',
    data
  })
}

/**
 * 查看日志明细
 * @param
 */
export function getLogUserDetails(data) {
  return request({
    url: projectApiUrl + '/construction/log/user-details',
    method: 'post',
    data
  })
}

/**
 * @description: 撤回
 * @return {object} data 接口参数
 */
export function retract(data) {
  return request({
    url: projectApiUrl + '/construction/log/retract',
    method: 'post',
    data
  })
}
/**
 * @description: 批量导出施工日志
 * @return {object} data 接口参数
 */
export function docExportBatc(data) {
  return request({
    url: projectApiUrl + '/construction/log/doc-export-batch',
    method: 'post',
    data
  })
}
/**
 * @description: 批量打印施工日志
 * @return {object} data 接口参数
 */
export function docPrintBatch(data) {
  return request({
    url: projectApiUrl + '/construction/log/doc-print-batch',
    method: 'post',
    data
  })
}

